package com.sl.init;

import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class ApplicationStartedEventLisener implements ApplicationListener<ApplicationStartedEvent> {

	@Override
	public void onApplicationEvent(ApplicationStartedEvent event){
		ApplicationContext applicationContext = event.getApplicationContext();
		System.out.println(this.getClass().getSimpleName()+".onApplicationEvent执行");
	}
}
